package hotciv.view.tool;

import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.util.ArrayList;

import hotciv.framework.Game;
import hotciv.framework.GameConstants;
import hotciv.framework.Position;
import hotciv.framework.Tile;
import hotciv.framework.Unit;
import hotciv.view.GfxConstants;
import minidraw.framework.DrawingEditor;
import minidraw.framework.Tool;
import minidraw.standard.AbstractTool;
import minidraw.standard.NullTool;

public class CompositionalTool extends NullTool {

	private DrawingEditor editor;
	private Game game;
	private ArrayList<Tool> tools;
	
	public CompositionalTool(DrawingEditor editor) 
	{
		this.editor = editor;
		tools = new ArrayList<Tool>();
	}
	
	public void addTool(Tool t) {
		tools.add(t);
	}
	
	@Override
	public void keyDown(KeyEvent evt, int key) {
		for (Tool t : tools) t.keyDown(evt, key);
	}
	
	@Override
	public void mouseDown(MouseEvent e, int x, int y) 
	{
		for (Tool t : tools) t.mouseDown(e, x, y);
	}
	
	@Override
	public void mouseDrag(MouseEvent e, int x, int y)
	{
		for (Tool t : tools) t.mouseDrag(e, x, y);
	}
	
	@Override
	public void mouseMove(MouseEvent e, int x, int y)
	{
		for (Tool t : tools) t.mouseMove(e, x, y);
	}
	
	@Override
	public void mouseUp(MouseEvent e, int x, int y) 
	{
		for (Tool t : tools) t.mouseUp(e, x, y);
	}
	
}
